﻿<Page
    x:Class="SoapServiceExample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SoapServiceExample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.DataContext>
            <local:ViewModel/>
        </Grid.DataContext>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="Enter Zip Code:" Style="{StaticResource SubheaderTextBlockStyle}"/>
            <TextBox Width="120" MaxLength="5" Margin="20 0 0 0" Text="{Binding ZipCode, Mode=TwoWay}"/>
            <Button Content="Get Forecast"
                    Margin="20 0 0 0"
                    Command="{Binding SubmitCommand}"
                    CommandParameter="{Binding ZipCode}"/>
        </StackPanel>
        <local:Forecast Grid.Row="1" DataContext="{Binding CurrentForecast}"/>
        </Grid>
</Page>
